<?php

namespace Frontend;

/**
 * Description of ContentsController
 *
 * @author dung
 */

use BaseController,
    Content,
    Sentry,
    Input,
    Lang,
    Validator,
    Redirect,
    View;

class ContentsController extends BaseController
{
    public function __construct()
    {
        $this->beforeFilter('auth', array('getCreate', 'postCreate'));
    }

    public function getIndex()
    {

    }

    public function getDetails($id, $slug)
    {

    }

    public function getCreate()
    {
        $data['lesson'] = new \Lesson();
        $data['topics'] = \Topic::returnArray();
        $myModel = new \MyModel();

        $data['categories'] = $myModel->listAllItemsToArray('Category', array('value' => 'id', 'display' => 'title'));
        $data['tones'] = $myModel->listAllItemsToArray('Tone', array('value' => 'id', 'display' => 'title'));
        return View::make('frontend/lessons/create', compact('data'));
    }

    public function postCreate()
    {

    }
}
